<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
/*
    跳转

  Location是代表地址栏
*/
   //获取当前地址栏内容
   //  console.log(location.href);
   //    alert("我们即将跳转到百度")
   //  location.href="https://www.baidu.com";
      // 3秒之后跳转百度
      document.write("3秒之后跳转百度");
      // 用到定时器
      setTimeout(function(){location.href="https://www.baidu.com";},3000);

</script>
</body>
</html>